package com.framework.workflow.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author zzg
 */
@Data
public class ProcessDetail {
    private String name;
    private String id;
    @ApiModelProperty(value = "字段类型: 1 已处理 2 进行中， 3 未处理")
    private Integer type;
    private Date date;

    private List<Detail> details = new ArrayList<>();

    public void add(Detail detail) {
        this.details.add(detail);
    }

    public void addAll(List<Detail> details) {
        this.details.addAll(details);
    }

    public boolean hasDetail() {
        return details.size() > 0;
    }

    @Data
    public static class Detail {
        private String name;
        private String desc;
    }
}
